/*
 * @Author: jth2514 1509572300@qq.com
 * @Date: 2024-05-12 14:04:26
 * @LastEditors: jth2514 1509572300@qq.com
 * @LastEditTime: 2024-05-12 14:32:33
 * @FilePath: \java\Prog1.java
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
public class Prog1 {
    public abstract class Shape
    {
        public abstract double area()
        {
            return _height*_width;
        }

        public abstract double perimeter()
        {
            return (_height+_width)*2;
        }
    }

    public class Rectangle extends Shape
    {
        public double _width;
        public double _height;
        public double getwidth()
        {
            return _width;
        }
        public void setwidth(double width)
        {
            _width=width;
        }
        public double getheight()
        {
            return _height;
        }
        public void setheight(double height)
        {
            _height=height;
        }
    }
    public static void main(String[] argv)
    {

    }
}
